<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		
		<link rel="stylesheet" href="../../common/css/header2.css">
		<link rel="stylesheet" href="../../common/css/nav2.css">
		<link rel="stylesheet" href="../../common/css/welcomePage.css">
		<link rel="stylesheet" href="../../common/css/editinfo.css">
	
	</head>
	<body>
		<!-- <%-include('../comp/header.ejs')%> -->
		<div class="box">
			<nav class="navv">
				<div>
					<p><a href='welcomePage.html'>惠光健康</a></p>
				</div>
				<div class="navv-right">
					<p>用户 ：<span>
							username
						</span></p>
					<p>退出</p>
					<i class="font fullscreen" title="全屏">&#xeb11</i>
				</div>
			</nav>
		</div>
		<div class="body-center">
			<!-- <%-include('../comp/nav.ejs')%> -->
			<div class="body-left">
				<ul>
					<li><i>&#xe627</i>机构管理</li>
					<li><a href='hospitallist.html'><i></i>医院管理</a></li>
					<li><i>&#xe604</i>人员管理</li>
					<li><a href=''><i></i>用户管理</a></li>
					<li><a href='familydat.html'><i></i>家人管理</a></li>
					<li><a href=''><i></i>登录账号</a></li>
					<li><i>&#xe66b</i>内容管理</li>
					<li><a href='Conmanagement.html'><i></i>资讯管理</a></li>
					<li><a href=''><i></i>广告管理</a></li>
					<li><a href='pageGL.html'><i></i>页面管理</a></li>
					<li><i>&#xe8bd</i>消息管理</li>
					<li><i>&#xe78a</i>版本升级</li>
					<li><i>&#xe66b</i>用户反馈</li>
				</ul>
			</div>
			<div class="centered">
				<div class="information">
					<div class="head">
						<div class="path">
							<span>首页</span><span>&gt;</span>
							<span>信息管理</span><span>&gt;</span>
							<span>咨询管理</span>
						</div>
						<a href="Conmanagement.html" class="return">
							返回
						</a>
					</div>
					<div class="addinfo">
						<form action="/index/editConsult" method="post" enctype="multipart/form-data">
							<p>
								<span>*分类:</span><select name="fclass">
									<option value="<%=sousedata.fclass%>"><%=sousedata.fclass%></option>
									<option value="1">新兴卫生</option>
									<option value="2">慧光</option>
								</select>
							</p>
							<p><span>*标题:</span><input class="infotitle" type="text" name="title"
									value="<%=sousedata.title%>"></p>
							<div class="img">
								<span>*缩略图:</span>
								<label for="file">+
									<img class="small_img" src="<%=sousedata.pic%>" alt="" height="100" width="100">
									<div class="del">
										删除
									</div>
								</label>
								<input type="file" id="file" name="pic">
								<p class="dif">为了保证展示效果,建议图片尺寸100*84px</p>
							</div>
							<p>
								<span>资讯地址:</span>
								<input type="url" class="url" placeholder="请输入打开的页面地址" name="url" value="<%=sousedata.url%>">
							</p>
							<p><span>内容:</span>
								<textarea name="content" id="" cols="30" rows="10"><%=sousedata.content%></textarea>
							</p>
							<p>
								<span>*是否显示</span>
								<select name="is_status">
									<option value="<%=sousedata.is_status%>"><%=sousedata.is_status%></option>
									<option value="显示">显示</option>
									<option value="不显示">不显示</option>
								</select>
							</p>

							<input class="infotitle" type="hidden" name="uid"
							value="<%=sousedata.consultID%>">

							<p><button type="submit">保存</button></p>
						</form>
					</div>
				</div>
			</div>
		</div>
		<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.1/jquery.min.js"
			integrity="sha512-aVKKRRi/Q/YV+4mjoKBsE4x3H+BkegoM/em46NNlCqNTmUYADjBbeNefNxYV7giUp0VxICtqdrbqU7iVaeZNXA=="
			crossorigin="anonymous" referrerpolicy="no-referrer"></script>
		<script type="text/javascript">
			let pic = $('#file');
			let delpic = $('.del');
			pic.change(function() {
				let file = new FileReader();
				file.readAsDataURL(this.files[0]);
				file.onload = function() {
					$('.small_img')[0].src = file.result;
				}
			})
			delpic.click(function(e) {
				e.preventDefault();
				$('.small_img')[0].src = '';
			})
		</script>
	</body>
</html>
